% Computes the cost of a single helicopter trajectory.
function [ cost ] = TrajectoryCost( traj, trajectoryLength, target_x, idx, Q, R)
    cost = 0;
    for i=1:trajectoryLength
        x = traj(:, i);
        cost = cost +  x'*Q*x; % + u'*R*u but this R is 0
    end
end

